package cn.net.lwj.sjqy.service.Impl;

import cn.net.lwj.sjqy.dao.mysql.BmDmMapper;
import cn.net.lwj.sjqy.dao.mysql.SjqyConfigDao;
import cn.net.lwj.sjqy.entity.BmDm;
import cn.net.lwj.sjqy.entity.JsonResult;
import cn.net.lwj.sjqy.service.TestService;
import java.util.List;
import java.util.stream.Collectors;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;


@Service
public class TestServiceImpl implements TestService {

    @Autowired
    private BmDmMapper bmDmMapper;

    @Override
    public JsonResult test() {
        List<BmDm> bmDms = bmDmMapper.selectAll();
        System.out.println(bmDmMapper.selectByPrimaryKey(1064010002));
        System.out.println(bmDmMapper.selectByPrimaryKey(1064010004));
        bmDmMapper.selectByPrimaryKey(1064010002);
        //bmDms.forEach(System.out::println);
        List<String> strs = bmDms.stream().map(n -> {
            System.out.println(n.getDmms());
            return n.getDmms();
        }).collect(Collectors.toList());
        return JsonResult.responseSuccess("success", bmDms);
    }
}
